package jun.learn.spring.interceptor;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

public class MethodInterceptorTest implements MethodInterceptor {

	public Object invoke(MethodInvocation invocation) throws Throwable {
		long start = System.currentTimeMillis();
		Object rtn = null;
		rtn = invocation.proceed();
		long end = System.currentTimeMillis();
		System.out.println("["+invocation.getMethod()+"]"+(end-start)+"毫秒");
		return rtn;
	}

}
